home *** CD-ROM | disk | FTP | other *** search
/ Champak 74 / Volume 74 My Disc - Damaged.iso / Games / TrendyCouple.swf / scripts / frame_6 / DoAction_2.as next >
Text File  |  2008-08-11  |  9KB  |  397 lines

  1. function block_all()
  2. {
  3.    for(var _loc2_ in _root)
  4.    {
  5.       _root[_loc2_].enabled = false;
  6.    }
  7.    go_sponsor.enabled = true;
  8. }
  9. function unblock_all()
  10. {
  11.    for(var _loc2_ in _root)
  12.    {
  13.       _root[_loc2_].enabled = true;
  14.    }
  15. }
  16. stop();
  17. if(_root._currentframe == 6)
  18. {
  19.    j = 1;
  20.    while(j <= 5)
  21.    {
  22.       _root["head" + j].gotoAndStop(j);
  23.       _root["head" + j].n = j;
  24.       _root["head" + j].onPress = function()
  25.       {
  26.          head.gotoAndStop(this.n);
  27.       };
  28.       j++;
  29.    }
  30.    j = 1;
  31.    while(j <= 5)
  32.    {
  33.       _root["body" + j].gotoAndStop(j);
  34.       _root["body" + j].n = j;
  35.       _root["body" + j].ty = 148;
  36.       j++;
  37.    }
  38.    _root.body2.tx = 332;
  39.    _root.body3.tx = 388;
  40.    _root.body5.tx = 444;
  41.    _root.body1.tx = 498;
  42.    _root.body4.tx = 554;
  43.    a = 1;
  44.    while(a <= 5)
  45.    {
  46.       _root["body" + a]._x = _root["body" + a].tx;
  47.       _root["body" + a]._y = _root["body" + a].ty;
  48.       a++;
  49.    }
  50.    i = 1;
  51.    while(i <= 5)
  52.    {
  53.       _root["body" + i].onPress = function()
  54.       {
  55.          this.startDrag();
  56.       };
  57.       _root["body" + i].onRelease = function()
  58.       {
  59.          this.stopDrag();
  60.          if(this._x < 200)
  61.          {
  62.             body.gotoAndStop(this.n + 1);
  63.             a = 1;
  64.             while(a <= 5)
  65.             {
  66.                _root["body" + a]._visible = 1;
  67.                _root["body" + a]._x = _root["body" + a].tx;
  68.                _root["body" + a]._y = _root["body" + a].ty;
  69.                a++;
  70.             }
  71.             this._visible = 0;
  72.          }
  73.          else
  74.          {
  75.             this._x = this.tx;
  76.             this._y = this.ty;
  77.          }
  78.       };
  79.       i++;
  80.    }
  81.    body.onPress = function()
  82.    {
  83.       bodyc = this._currentframe - 1;
  84.       _root["body" + bodyc]._x = _root._xmouse;
  85.       _root["body" + bodyc]._y = _root._ymouse;
  86.       _root["body" + bodyc].startDrag();
  87.       _root["body" + bodyc]._visible = 1;
  88.       this.gotoAndStop(1);
  89.    };
  90.    body.onReleaseOutside = function()
  91.    {
  92.       if(_root._xmouse > 200)
  93.       {
  94.          _root["body" + bodyc].stopDrag();
  95.          _root["body" + bodyc]._x = _root["body" + bodyc].tx;
  96.          _root["body" + bodyc]._y = _root["body" + bodyc].ty;
  97.       }
  98.       else
  99.       {
  100.          _root["body" + bodyc]._visible = 0;
  101.          this.gotoAndStop(bodyc + 1);
  102.       }
  103.    };
  104.    j = 1;
  105.    while(j <= 5)
  106.    {
  107.       _root["legs" + j].gotoAndStop(j);
  108.       _root["legs" + j].n = j;
  109.       _root["legs" + j].ty = 240;
  110.       j++;
  111.    }
  112.    _root.legs3.tx = 332;
  113.    _root.legs1.tx = 388;
  114.    _root.legs2.tx = 444;
  115.    _root.legs5.tx = 498;
  116.    _root.legs4.tx = 554;
  117.    a = 1;
  118.    while(a <= 5)
  119.    {
  120.       _root["legs" + a]._x = _root["legs" + a].tx;
  121.       _root["legs" + a]._y = _root["legs" + a].ty;
  122.       a++;
  123.    }
  124.    i = 1;
  125.    while(i <= 5)
  126.    {
  127.       _root["legs" + i].onPress = function()
  128.       {
  129.          this.startDrag();
  130.       };
  131.       _root["legs" + i].onRelease = function()
  132.       {
  133.          this.stopDrag();
  134.          if(this._x < 200)
  135.          {
  136.             legs.gotoAndStop(this.n + 1);
  137.             a = 1;
  138.             while(a <= 5)
  139.             {
  140.                _root["legs" + a]._visible = 1;
  141.                _root["legs" + a]._x = _root["legs" + a].tx;
  142.                _root["legs" + a]._y = _root["legs" + a].ty;
  143.                a++;
  144.             }
  145.             this._visible = 0;
  146.          }
  147.          else
  148.          {
  149.             this._x = this.tx;
  150.             this._y = this.ty;
  151.          }
  152.       };
  153.       i++;
  154.    }
  155.    legs.onPress = function()
  156.    {
  157.       legsc = this._currentframe - 1;
  158.       _root["legs" + legsc]._x = _root._xmouse;
  159.       _root["legs" + legsc]._y = _root._ymouse;
  160.       _root["legs" + legsc].startDrag();
  161.       _root["legs" + legsc]._visible = 1;
  162.       this.gotoAndStop(1);
  163.    };
  164.    legs.onReleaseOutside = function()
  165.    {
  166.       if(_root._xmouse > 200)
  167.       {
  168.          _root["legs" + legsc].stopDrag();
  169.          _root["legs" + legsc]._x = _root["legs" + legsc].tx;
  170.          _root["legs" + legsc]._y = _root["legs" + legsc].ty;
  171.       }
  172.       else
  173.       {
  174.          _root["legs" + legsc]._visible = 0;
  175.          this.gotoAndStop(legsc + 1);
  176.       }
  177.    };
  178.    j = 1;
  179.    while(j <= 5)
  180.    {
  181.       _root["feet" + j].gotoAndStop(j);
  182.       _root["feet" + j].n = j;
  183.       _root["feet" + j].ty = 340;
  184.       j++;
  185.    }
  186.    _root.feet4.tx = 332;
  187.    _root.feet1.tx = 388;
  188.    _root.feet3.tx = 444;
  189.    _root.feet2.tx = 498;
  190.    _root.feet5.tx = 554;
  191.    a = 1;
  192.    while(a <= 5)
  193.    {
  194.       _root["feet" + a]._x = _root["feet" + a].tx;
  195.       _root["feet" + a]._y = _root["feet" + a].ty;
  196.       a++;
  197.    }
  198.    i = 1;
  199.    while(i <= 5)
  200.    {
  201.       _root["feet" + i].onPress = function()
  202.       {
  203.          this.startDrag();
  204.       };
  205.       _root["feet" + i].onRelease = function()
  206.       {
  207.          this.stopDrag();
  208.          if(this._x < 200)
  209.          {
  210.             feet.gotoAndStop(this.n + 1);
  211.             a = 1;
  212.             while(a <= 5)
  213.             {
  214.                _root["feet" + a]._visible = 1;
  215.                _root["feet" + a]._x = _root["feet" + a].tx;
  216.                _root["feet" + a]._y = _root["feet" + a].ty;
  217.                a++;
  218.             }
  219.             this._visible = 0;
  220.          }
  221.          else
  222.          {
  223.             this._x = this.tx;
  224.             this._y = this.ty;
  225.          }
  226.       };
  227.       i++;
  228.    }
  229.    feet.onPress = function()
  230.    {
  231.       feetc = this._currentframe - 1;
  232.       _root["feet" + feetc]._x = _root._xmouse;
  233.       _root["feet" + feetc]._y = _root._ymouse;
  234.       _root["feet" + feetc].startDrag();
  235.       _root["feet" + feetc]._visible = 1;
  236.       this.gotoAndStop(1);
  237.    };
  238.    feet.onReleaseOutside = function()
  239.    {
  240.       if(_root._xmouse > 200)
  241.       {
  242.          _root["feet" + feetc].stopDrag();
  243.          _root["feet" + feetc]._x = _root["feet" + feetc].tx;
  244.          _root["feet" + feetc]._y = _root["feet" + feetc].ty;
  245.       }
  246.       else
  247.       {
  248.          _root["feet" + feetc]._visible = 0;
  249.          this.gotoAndStop(feetc + 1);
  250.       }
  251.    };
  252.    j = 1;
  253.    while(j <= 5)
  254.    {
  255.       _root["ykr" + j].gotoAndStop(j);
  256.       _root["ykr" + j].n = j;
  257.       _root["ykr" + j].ty = 430;
  258.       j++;
  259.    }
  260.    _root.ykr5.tx = 332;
  261.    _root.ykr3.tx = 388;
  262.    _root.ykr2.tx = 444;
  263.    _root.ykr1.tx = 498;
  264.    _root.ykr4.tx = 554;
  265.    a = 1;
  266.    while(a <= 5)
  267.    {
  268.       _root["ykr" + a]._x = _root["ykr" + a].tx;
  269.       _root["ykr" + a]._y = _root["ykr" + a].ty;
  270.       a++;
  271.    }
  272.    i = 1;
  273.    while(i <= 5)
  274.    {
  275.       _root["ykr" + i].onPress = function()
  276.       {
  277.          this.startDrag();
  278.       };
  279.       _root["ykr" + i].onRelease = function()
  280.       {
  281.          this.stopDrag();
  282.          if(this._x < 200)
  283.          {
  284.             ykr.gotoAndStop(this.n + 1);
  285.             a = 1;
  286.             while(a <= 5)
  287.             {
  288.                _root["ykr" + a]._visible = 1;
  289.                _root["ykr" + a]._x = _root["ykr" + a].tx;
  290.                _root["ykr" + a]._y = _root["ykr" + a].ty;
  291.                a++;
  292.             }
  293.             this._visible = 0;
  294.          }
  295.          else
  296.          {
  297.             this._x = this.tx;
  298.             this._y = this.ty;
  299.          }
  300.       };
  301.       i++;
  302.    }
  303.    ykr.onPress = function()
  304.    {
  305.       ykrc = this._currentframe - 1;
  306.       _root["ykr" + ykrc]._x = _root._xmouse;
  307.       _root["ykr" + ykrc]._y = _root._ymouse;
  308.       _root["ykr" + ykrc].startDrag();
  309.       _root["ykr" + ykrc]._visible = 1;
  310.       this.gotoAndStop(1);
  311.    };
  312.    ykr.onReleaseOutside = function()
  313.    {
  314.       if(_root._xmouse > 200)
  315.       {
  316.          _root["ykr" + ykrc].stopDrag();
  317.          _root["ykr" + ykrc]._x = _root["ykr" + ykrc].tx;
  318.          _root["ykr" + ykrc]._y = _root["ykr" + ykrc].ty;
  319.       }
  320.       else
  321.       {
  322.          _root["ykr" + ykrc]._visible = 0;
  323.          this.gotoAndStop(ykrc + 1);
  324.       }
  325.    };
  326. }
  327. head.gotoAndStop(gi1);
  328. body.gotoAndStop(gi2);
  329. legs.gotoAndStop(gi3);
  330. feet.gotoAndStop(gi4);
  331. ykr.gotoAndStop(gi5);
  332. but_next1.onRelease = function()
  333. {
  334.    gi1 = head._currentframe;
  335.    gi2 = body._currentframe;
  336.    gi3 = legs._currentframe;
  337.    gi4 = feet._currentframe;
  338.    gi5 = ykr._currentframe;
  339.    _root.gotoAndStop(7);
  340. };
  341. if(replay1)
  342. {
  343.    head.gotoAndStop(1);
  344.    body.gotoAndStop(1);
  345.    legs.gotoAndStop(1);
  346.    feet.gotoAndStop(1);
  347.    ykr.gotoAndStop(1);
  348.    but_next1._visible = 0;
  349.    time_go._visible = 1;
  350.    replay1 = false;
  351. }
  352. if(!gameplay)
  353. {
  354.    but_next1._visible = 0;
  355.    block_all();
  356.    m_clock.m_str._rotation = 0;
  357.    m_clock_go = false;
  358.    num_obj = 1000;
  359.    bont = 0;
  360.    pp = 0;
  361. }
  362. else
  363. {
  364.    time_go._visible = 0;
  365. }
  366. time_go.bt_play.onRelease = function()
  367. {
  368.    time_go.play();
  369.    gameplay = true;
  370. };
  371. onEnterFrame = function()
  372. {
  373.    if(time_go._currentframe == 45)
  374.    {
  375.       unblock_all();
  376.       but_next1._visible = 1;
  377.       m_clock_go = true;
  378.    }
  379.    if(m_clock_go)
  380.    {
  381.       if(pp >= 1800)
  382.       {
  383.          if(nbt._currentframe == 1)
  384.          {
  385.             nbt.play();
  386.          }
  387.          m_clock_go = false;
  388.       }
  389.       else
  390.       {
  391.          m_clock.m_str._rotation += 0.2;
  392.          bont += 0.5;
  393.          pp += 1;
  394.       }
  395.    }
  396. };
  397.